﻿<!DOCTYPE html>
<html lang="zh-CN">

	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		{% load static %}
		<link rel="stylesheet" type="text/css" href="{% static 'paper/bootstrap-3.3.7-dist/css/bootstrap.min.css' %}" />
		<link rel="stylesheet" type="text/css" href="{% static 'paper/css/exam.css' %}" />

	</head>

	<body>
		<nav class="navbar navbar-default">
			<div class="container">
				<div class="navbar-header">
					<button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					</button>
					<a href="" class="navbar-brand"><span class="
glyphicon glyphicon-user">&nbsp;</span>考试成绩</a>
				</div>
				<div class="collapse navbar-collapse">
					<ul class="nav navbar-nav">
						<li>
							<a href="/admin/"><span class="glyphicon glyphicon-home">&nbsp;</span>试卷后台</a>
						</li>
						<li>
							<a href="">页面管理</a>
						</li>
						<li>
							<a href="">信息管理</a>
						</li>
					</ul>

					<ul class="nav navbar-nav navbar-right">
						<li>
							<a href="{% url 'user:register' %}">老师注册</a>
						</li>
						<li class="dropdown">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown">
								用户管理
								<b class="caret"></b>
							</a>
							<ul class="dropdown-menu">
								<li>
									<a href="#">请登陆</a>
								</li>
								<li>
									<a href="#">Another action</a>
								</li>
								<li>
									<a href="#">Something else here</a>
								</li>
								<li class="divider"></li>
								<li>
									<a href="#">Separated link</a>
								</li>
							</ul>
						</li>
					</ul>
				</div>

			</div>
		</nav>

		<form action="{% url 'result:result' user_id stu_user_id paper_name %}" method='post'>
			{% csrf_token %}
			<input type="text" name="tiku" value="{{question_id_list}}" style="display: none;" />
			<input type="text" name="numb" value="{{topic_amount}}" style="display: none;" />
			<input type="text" name="question_type_list" value="{{topic_bank}}" style="display: none;" />
			<div class="container">
				<div class="row">
					<div class="col-md-12">
						<div class="alert alert-warning alert-dismissible mb" role="alert">
							<button type="button" class="close" data-dismiss="alert" aria-label="Close">
  							<span aria-hidden="true">&times;</span>
  						</button>
							<strong>注意！</strong> 把所有题目做完之后才可以点提交哦
						</div>
					</div>
				</div>
			</div>
			<div class="container">
				<div class="row">
					<div class="container col-md-12">

						<a id="modal-397325" href="#modal-container-397325" data-toggle="modal"><button type="button" class="btn btn-primary">考试完成提交</button></a>

						<div class="modal fade" id="modal-container-397325" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
							<div class="modal-dialog">
								<div class="modal-content">
									<div class="modal-header">
										<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
										<h4 class="modal-title" id="myModalLabel" contenteditable="true">认真检查试卷</h4>
									</div>
									<div class="modal-body" contenteditable="true">确定要提交吗？</div>
									<div class="modal-footer">
										<button type="button" class="btn btn-default" data-dismiss="modal" contenteditable="true">关闭</button>
										<input type="submit" class="btn btn-primary" value="确定" />

									</div>
								</div>

							</div>

						</div>

						<div class="container" style="margin-top: 60px;">
							<div class="row" style="text-align: center; font-size: 20px;">
								<h2 align="center">新生入学测试</h2>

								<br />
								<p align="center">满分{{zongfen}}分</p>
								{% for i in topic_score %}
									第{{forloop.counter}}道题{{i}}分,
								{%endfor%}

								<ul class="nav nav-tabs" role="tablist">
									{% for question_list in question_set %}
									{% if forloop.counter == 1 %}
									<li class="nav-item active">
									{% else %}
									<li class="nav-item">
									{% endif %}
										<a class="nav-link " data-toggle="tab" href="#question{{forloop.counter}}">{{question_list.0.question_type.question_type_text}}</a>
									{% endfor %}
									</li>
								</ul>

								<div class="tab-content">

									{% for question_list in question_set %} {% if forloop.counter == 1 %}
									<div id="question{{forloop.counter}}" class="container tab-pane active  col-md-12"><br> {% else %}
										<div id="question{{forloop.counter}}" class="container tab-pane  col-md-12"><br> {% endif %}
											<!--<h1 align="center">{{question_list.0.question_type.question_type_text}}</h3>--><br /><br />
									
								
			  				{% if question_list.0.question_type.question_type_text == "逻辑推理测试选择题" %}
			  					<ol>
									
									{% for question in question_list %}
									<li>{{question.question_text}}</li><br />
										{% for choice in question.choice_set.all %}
										
										<input type="radio" id="choice{{choice.id}}" name="{{question.id}}" value="{{choice.choice_text}}"/>
										<label for="choice{{choice.id}}">{{choice.choice_text}}</label><br />
										{% endfor %}
										<br />
									{% endfor %}
								</ol>
							{% endif %}
							
							
							{% if question_list.0.question_type.question_type_text == "逻辑推理测试简答题"%}
							<ol>
								{% for question in question_list%}
								
							
										<li>{{question.question_text}}</li>  
										<br />
										<textarea class="form-control" rows="3" name="{{question.id}}"></textarea>
							
								<br />
								{%endfor%}
							</ol>
							{% endif %}
							
							
							
							
							
							{% if question_list.0.question_type.question_type_text == "中英文互译"%}
							<ol>
			 				
								{% for question in question_list%}
								<li>
									{{question.question_text}}
									<input type="text" name="{{question.id}}" />
								</li><br />
								{%endfor%}
							</ol>
							{% endif %}
							
							
							{% if question_list.0.question_type.question_type_text == "判断正误"%}
							<ol>
			 				
								{% for question in question_list%}
								<li>
									{{question.question_text}}
									<input type="text" name="{{question.id}}" />
								</li><br />
								{%endfor%}
							</ol>
							{% endif %}
							
							
							{% if question_list.0.question_type.question_type_text == "填空题"%}
							
							
							<ol>
								{% for question in question_list%}
								<li>
									{{question.question_text}}
									<input type="text" name="{{question.id}}" />
								</li><br />
								{%endfor%}
							</ol>
							{% endif %}
							
							
							
							{% if question_list.0.question_type.question_type_text == "素养测试"%}
							
							
							<ol>
			 				
								{% for question in question_list%}
								<div class="form-group">
									<label for="name"><li>{{question.question_text}}</li></label>
									<br />
									<textarea class="form-control" rows="3" name="{{question.id}}"></textarea>
								</div><br />
								{%endfor%}
							</ol>
							{% endif %}
							
							
							
							
							</div>
						{% endfor %}
						</div>
						</div>
					</div>
				</div>
			
				</div>
			
			</div>
		
		</form>
		<script type="text/javascript" src="{% static 'paper/jquery-3.3.1.min.js' %}">
		</script>
		<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js">
		</script>
		<script src="{% static 'paper/bootstrap-3.3.7-dist/js/bootstrap.min.js' %}" type="text/javascript">
		</script>
	</body>

</html>